package com.jghz.framework.utils;

import java.util.Random;
import java.util.UUID;
/**
 * 生成随机码
 * @author ethan.du
 *
 */
public class GuidUtil {
	public static String newGuid()
	{
		return UUID.randomUUID().toString();
	}
	
	/*public static String newGuid(String objectGuid)
	{
		if (StringUtil.isEmpty(objectGuid))
			return UUID.randomUUID().toString();
		else
			return objectGuid.trim();
	}*/
	public static int random(int max,int min){
        Random random = new Random();
        int s = random.nextInt(max)%(max-min+1) + min;
        return s;
	}
}
